package com.example.software.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class TaskDTO {
    
    @NotBlank(message = "任务标题不能为空")
    private String title;
    
    @NotBlank(message = "任务内容不能为空")
    private String content;
    
    @NotBlank(message = "工作地点不能为空")
    private String location;
    
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    
    @NotNull(message = "报酬不能为空")
    private BigDecimal salary;
    
    @NotBlank(message = "任务类型不能为空")
    private String jobType;
} 